#include "PreCompile.h"
#include "Frame.h"
#include "MsgSink.h"
#include "AsyncSelect.h"

#pragma comment(linker, "/SUBSYSTEM:WINDOWS")

int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
	AllocConsole();
	freopen("CONOUT$", "w", stdout);
	SetInvalidParameterHandler();
	SetPureCallHandler();

	CFrame* pFrame = CFrame::Get();
	char winName[] = "AsyncSelect";
	pFrame->Create(winName);
	INet* pNet = new CAsyncSelect();
	pNet->Initialize();
	pNet->Connect("127.0.0.1", 1024);
	pFrame->SetMsgSink(new CMsgSink());
	pFrame->MsgLoop();
	return 0;
}
